<template>
  <div class="message-input-layout">
    <input type="text" v-model="text">
    <button type="button" @click="sendMessage">发表留言</button>
  </div>
</template>

<script>
export default {
  name: 'DEMOMessageInput',

  data() {
    return {
      text: ''
    };
  },

  mounted() {

  },

  methods: {
    sendMessage() {
      console.log(this.text);
      this.$emit('mysend', this.text)
    }
  },
};
</script>

<style lang="less" scoped></style>